#include"Thread.hpp"


void task_1()
{
    std::cout << "task_1" << std::endl;
}

void task_2()
{
    std::cout << "task_2" << std::endl;
}

void task_3()
{
    std::cout << "task_3" <<std::endl;
}

void task_4()
{
    std::cout << "task_4" <<std::endl;
}

void task_5()
{
    std::cout << "task_5" <<std::endl;
}


int main()
{
    // THREAD::Thread t("thread_1",task);
    // t.start();
    // t.join();

    std::vector<THREAD::Thread> ths;
    std::vector<func_t> task = {task_1,task_2,task_3,task_4,task_5};
    for(int i = 0;i<nums;i++)
    {
        std::string name = "thread-";
        name += std::to_string(i+1);
        THREAD::Thread t(name,task[i]);
        ths.push_back(t);
    }

    for(auto& th:ths)
    {
        th.start();
    }

    for(auto& th:ths)
    {
        th.join();
    }

    
    
    return 0;
}